import { HTMLElement, TextNode } from 'node-html-parser';

export default function init(html: HTMLElement | TextNode, ...components: Array<(html: HTMLElement) => void>) {
	return Promise.all(components.map((component) => {
		return component(html as HTMLElement);
	}));
}
